package com.mod.data 

{
	import adobe.utils.CustomActions;
	import com.calefk.core.Data;
	/**
	 * ...
	 * @author ...
	 */
	public class dtLevel  {
		
		public var numVillagers:int;
		public var numGuardians:int;
		public var numEnterBaseWin:int;
		public var enemies:Array;
		
		public function dtLevel(data:XML) {
			
			numVillagers = int(data.attribute("numVillagers"));
			trace( "numVillagers : " + numVillagers );
			numGuardians = int(data.attribute("numGuardians"));
			trace( "numGuardians : " + numGuardians );
			numEnterBaseWin = int(data.attribute("numEnterBaseWin"));
			trace( "numEnterBaseWin : " + numEnterBaseWin );
			
			enemies = new Array();
			var enemies_xml:XMLList = data.enemies;
			
			for each(var enemy_xml:XML in enemies_xml.elements()) {
				var data_enemy:dtEnemy = new dtEnemy(enemy_xml);
				enemies.push(data_enemy);            
			}			
		}
		
		public function cloneEnemies():Array {
			var clone:Array = enemies.concat();
			return clone;
		}

	}

}